package com.zx.mes.test.hyl.controller;

import com.zx.mes.test.hyl.feign.HelloClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试feign类
 * @author hyl
 * @date 2018-3-6
 */
@RestController
@RequestMapping("/hello")
@RefreshScope
public class HelloController {

    @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
    @Autowired
    private HelloClient helloClient;

    @Value("${neo.hello}")
    private String hello;

    @GetMapping("/hi")
    public String hi(){
        System.out.println("打印"+hello);
        return helloClient.hi();
    }
}
